gtk_container_add (GTK_CONTAINER (window), tree_view);
gtk_widget_realize (tree_view);
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
gtk_tree_store_prepend (store, &iter, NULL);
gtk_tree_store_set (store, &iter,
/* Expand and collapse the tree */
gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
gtk_tree_view_collapse_all (GTK_TREE_VIEW (tree_view));
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
/* Add another it */
g_object_set_data (G_OBJECT (filter), "private-hide-negative-numbers",
/* Expand */
gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
}
gtk_container_add (GTK_CONTAINER (window), tree_view);
gtk_widget_realize (tree_view);
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
/* Remove a node */
gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter);
gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter);
gtk_tree_store_remove (store, &iter);
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
}
view = gtk_tree_view_new_with_model (filter);
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
add = TRUE;
gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
check_level_length (GTK_TREE_MODEL_FILTER (filter), NULL, 2);
check_level_length (GTK_TREE_MODEL_FILTER (filter), "0", 1);
}
}
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
check_level_length (GTK_TREE_MODEL_FILTER (filter), "0", 3);
check_level_length (GTK_TREE_MODEL_FILTER (filter), "0:2", 1);
gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
check_level_length (GTK_TREE_MODEL_FILTER (filter), NULL, 1);
check_level_length (GTK_TREE_MODEL_FILTER (filter), "0", 1);
/* Make sure all groups are expanded, so the filter has the tree cached */
gtk_tree_view_expand_all (GTK_TREE_VIEW (view));
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
/* Should only yield a row-changed */
signal_monitor_append_signal (monitor, ROW_CHANGED, "3:0");